package schooltg.core.persist.dao;

import schooltg.core.data.User;
import schooltg.core.persist.entity.UserPO;
import mtons.modules.persist.BaseRepository;
import mtons.modules.pojos.Paging;

import java.util.List;
import java.util.Set;

public interface UserDao extends BaseRepository<UserPO> {
    UserPO getByUsername(String username);

    UserPO getByEmail(String email);
    
    List<UserPO> getHotUserByfans(int maxResults);
    
    List<UserPO> paging(Paging paging, String key);

    List<UserPO> findByIds(Set<Long> ids);

    void identityPost(List<Long> userIds, boolean identity);

    void identityComment(List<Long> userIds, boolean identity);

    void identityFollow(List<Long> userIds, boolean identity);

    void identityFans(List<Long> userIds, boolean identity);

    void identityFavors(List<Long> userIds, boolean identity);


    List<User> seach(Paging page, String q);
}
